package com.YxyBackMange.Entity.Sys;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.hibernate.validator.constraints.Length;

import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;


@Table(name = "sys_tb_login_record")
public class SysLoginRecord implements Serializable {

	//
	private Integer id;
	//
	@NotNull(message = "不能为空")
	private Integer userId;
	//登录时间
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone ="GMT+8:00" )
	private Date loginTime;
	//登录的ip地址
	@Length(max = 16, min = 0, message = "登录的ip地址长度为0-16个字符")
	private String loginIp;
	//是否登录成功
	private Integer isSuccess;

	private String loginName;

	private String loginMessage;
	private Integer typeId;


	public Integer getTypeId() {
		return typeId;
	}

	public void setTypeId(Integer typeId) {
		this.typeId = typeId;
	}

	public SysLoginRecord(){

	}

	public void setId(Integer id){
		this.id=id;
	}

	public Integer getId(){
		return this.id;
	}
	public void setUserId(Integer userId){
		this.userId=userId;
	}

	public Integer getUserId(){
		return this.userId;
	}
	public void setLoginTime(Date loginTime){
		this.loginTime=loginTime;
	}

	public Date getLoginTime(){
		return this.loginTime;
	}
	public void setLoginIp(String loginIp){
		this.loginIp=loginIp;
	}

	public String getLoginIp(){
		return this.loginIp;
	}
	public void setIsSuccess(Integer isSuccess){
		this.isSuccess=isSuccess;
	}

	public Integer getIsSuccess(){
		return this.isSuccess;
	}

	public String getLoginName() {
		return loginName;
	}

	public void setLoginName(String loginName) {
		this.loginName = loginName;
	}

	public String getLoginMessage() {
		return loginMessage;
	}

	public void setLoginMessage(String loginMessage) {
		this.loginMessage = loginMessage;
	}


}
